#ifndef CFILETEST_H
#define CFILETEST_H

#include <QObject>
#include <QString>
#include <QtXml/QtXml>

class CFileTest : public QObject
{
	Q_OBJECT
public:
	~CFileTest();
	QDomDocument loadT2PFile(QString t2pFileName);
        bool saveFile(QString t2pFileName, QDomDocument domDocument);
        QDomDocument newFile();
	QString getTmpPath();
	QString addImage(QString &file);

private:
	bool extractT2PFile(QString t2pFileName);
	bool decompress(const QString& file, const QString& dir);
	bool compress(const QString& zip, const QString& dir);
	int removeDir(QDir & dir);

private:
	QString t2pFile;
	QString t2pDir;
	bool fileIsOpen;
	QMap<QString,QByteArray> filist; //все файлы из архива

signals:
	void fileOpened(QString &path);
};
#endif
